<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<html>
<head>
    <title>医生的添加页面</title>
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript">
        $(function(){
            $('tbody tr:odd').addClass("trLight");
            $(".select-all").click(function(){
                if($(this).attr("checked")){
                    $(".checkBox input[type=checkbox]").each(function(){
                        $(this).attr("checked", true);
                    });
                }else{
                    $(".checkBox input[type=checkbox]").each(function(){
                        $(this).attr("checked", false);
                    });
                }
            });
        });
    </script>
    <style type="text/css">
        body {
            background:#FFF
        }
    </style>
</head>
<body>
<form method="post" action="<%=basePath%>docAddController" method="post" name="ThisForm">
    <div id="contentWrap">
        <!--表格控件 -->
        <div id="widget table-widget">
            <div class="pageTitle">医生添加</div>
            <div class="pageInfo">
                <table >
                    <tr>
                        <td width="20%" align="right">医生名</td>
                        <td width="20%"><input type="text" id="name" name="name" value="${doc.name}"/></td>
                        <td width="10%" align="right">密码</td>
                        <td width="50%"><input type="text" id="password" name="password" ${doc.password}/></td>
                    </tr>
                    <tr>
                        <td align="right">真实姓名</td>
                        <td ><input type="text" id="realname" name="realname" ${doc.realname}/></td>
                        <td align="right">所属科室</td>
                        <td >
                            <select id="departid" name="departid" >
                                <option value="0">-请选择-</option>
                                <c:if test="${doc.departid=='01'}"><option value="01" selected>外科</option></c:if>
                                <c:if test="${doc.departid!='01'}"><option value="01">外科</option></c:if>
                                <c:if test="${doc.departid=='02'}"><option value="02" selected>内科</option></c:if>
                                <c:if test="${doc.departid!='02'}"><option value="02">内科</option></c:if>
                                <c:if test="${doc.departid=='03'}"><option value="03" selected>神经科</option></c:if>
                                <c:if test="${doc.departid!='03'}"><option value="03" >神经科</option></c:if>
                                <c:if test="${doc.departid=='04'}"> <option value="04" selected>心脏科</option></c:if>
                                <c:if test="${doc.departid!='04'}"> <option value="04" >心脏科</option></c:if>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">职称</td>
                        <td >
                            <select id="positional" name="positional" >
                                <option value="0">请选择</option>
                                <c:if test="${doc.positional!='01'}"><option value="01">技师</option></c:if>
                                <c:if test="${doc.positional=='01'}"> <option value="01" selected>技师</option></c:if>
                                <c:if test="${doc.positional!='02'}"><option value="02">主任医师</option></c:if>
                                <c:if test="${doc.positional=='02'}"> <option value="02" selected>主任医师</option></c:if>
                                <c:if test="${doc.positional!='03'}"><option value="03" >专家</option></c:if>
                                <c:if test="${doc.positional=='03'}"> <option value="03" selected>专家</option></c:if>
                            </select>
                        </td>
                        <td align="right">联系电话</td>
                        <td><input type="text" id="tel" name="tel" ${doc.tel}/></td>
                    </tr>
                    <tr>
                        <td align="right">年龄</td>
                        <td ><input type="text" id="age" name="age" ${doc.age}/></td>
                        <td align="right">性别</td>
                        <td width="20%">
                            <select id="sex" name="sex" >
                                <option value="">请选择</option>
                                <c:if test="${doc.sex=='1'}"> <option value="1" selected>男</option></c:if>
                                <c:if test="${doc.sex!='1'}"> <option value="1" >男</option></c:if>
                                <c:if test="${doc.sex=='0'}"> <option value="0" selected>女</option></c:if>
                                <c:if test="${doc.sex!='0'}"> <option value="0" >女</option></c:if>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">家庭住址</td>
                        <td ><input type="text" id="address" name="address" ${doc.address}/></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td colspan="4" align="center"><input type="submit" value="确定"/> </td>
                    </tr>
                </table>
            </div>
        </div><!-- #widget -->
    </div>
</form>
</body>
</html>

